const express = require("express");
const app = express();

app.use(require('cors')()); //跨域模块
app.use(express.json());
app.use('/uploads', express.static(__dirname + '/uploads')) //静态资源
app.use('/admin', express.static(__dirname + '/admin')) //静态资源

require('./plugins/db')(app);
require('./routes/admin')(app);

app.listen(3000, () => {
  console.log('http://localhost:3000');
})